<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: wenlei
// +----------------------------------------------------------------------

// 应用公共文件
error_reporting(E_ERROR | E_WARNING | E_PARSE);

/**
 * 输出json格式
 * @param   bool   $status
 * @param   int    $code
 * @param   str    $msg
 * @param   array  $dataarr
 * @return  array 
 */
function echojson($status = true, $code = 0,$msg = '', $data = '') {
    $arr = array (
    	'status' => $status,
        'code'    => $code,
        'msg' => $msg,
        'data' => $data,
    );
    echo json_encode($arr);
    exit;
}


